import { defineStore } from 'pinia';
import { ref } from 'vue';
import { WebsiteInfo } from '@/http/public.type.ts';

const useWebsiteInfoStore = defineStore(
  'websiteInfo',
  () => {
    const websiteInfo = ref<WebsiteInfo>();

    const setWebsiteInfo = (tokenValue: WebsiteInfo) => {
      websiteInfo.value = tokenValue;
    };

    return {
      websiteInfo,
      setWebsiteInfo
    };
  },
  {
    persist: true
  }
);

export default useWebsiteInfoStore;
